home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 13
/
013.d81
/
dos #32
< prev
next >
Wrap
Text File
|
2022-08-26
|
4KB
|
197 lines
======================================
DOS & Don'ts -- Part 32
by James Gregory Weiler
======================================
This month, DOS & Don'ts covers with
depth and clarity the organization of
data on your 1541 floppy disk. There
is a lot of information here, so get
out your emetics and prepare for an
overDOSe. You may want to try
printing each article to help follow
along because the information is so
complex.
======================================
Part A: What's where.
======================================
Put simply, a Commodore 1541 stores
data in 35 concentric circles on your
disk. These circles are called
"tracks". They are numbered from one
(the track nearest the outside rim of
the disk) to 35 (the track nearest the
hub).
Each track is split up into a number
of smaller parcels called "blocks".
The number of blocks in any given
track is related to the physical size
of the track. Tracks near the outside
edge of the disk are physically longer
than those near the hub, so they
contain more blocks. Each block holds
256 bytes of data. Some folks call
blocks "sectors".
Tracks 1 through 17 each contain 21
blocks numbered 0 through 20.
Tracks 18 through 24 each contain 19
blocks numbered 0 through 18.
Tracks 25 through 30 each contain 18
blocks numbered 0 through 17.
Tracks 31 through 35 each contain 17
blocks numbered 0 through 16.
Track 18 is a special track known as
the directory track. The directory
track can be thought of as a disk's
index. It contains references to
every block and every file on the
disk. Whenever you tell DOS to do
anything to a file, the directory
track is the first place DOS looks.
The directory track is divided into
two parts: the BLOCK AVAILABILITY MAP
and the DIRECTORY.
The Block Availability Map (BAM for
short) is exactly what its name
implies: a map telling DOS which
blocks on the disk have files in them
and which are available for use by
new files. Every time you SAVE,
SCRATCH, or OPEN and WRITE a file,
DOS keeps track of what parts of the
disk it changes by updating the
BAM. The BAM is kept on track 18,
block 0.
The rest of the directory track is
made up of the directory itself.
The directory is the actual index to
the rest of the data on a disk. It
contains the names of all the files on
the disk and the track and block
numbers where DOS can find each file.
The directory resides on track 18,
blocks 1 through 18.
Map 1 is a chart of all the blocks
on a disk and what type of information
is stored in them. Except for track
18, the entire disk is used to store
files.
======================================
Map 1: What's where on a 1541 disk.
Each vertical line of letters
represents one track. Each letter
represents one block, starting with
block zero at the top of the map.
Key: B = BAM = block availability map
D = directory
F = file storage areas
tracks---> 11111111112222222222333333
12345678901234567890123456789012345
00 FFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFFFF
01 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
02 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
03 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
04 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
05 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
06 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
07 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
08 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
09 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
10 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
11 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
12 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
13 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
14 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
15 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
16 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFFF
17 FFFFFFFFFFFFFFFFFDFFFFFFFFFFFF
18 FFFFFFFFFFFFFFFFFDFFFFFF
19 FFFFFFFFFFFFFFFFF
20 FFFFFFFFFFFFFFFFF
12345678911111111112222222222333333
tracks---> 01234567890123456789012345
=======< continued in Part 33 >=======